﻿using RsCms.Core;
using RsCms.Entities;
using RsCode.Domain;

namespace RsCms.Data.Mysql
{
    public class PostsRepository : IPostsRepository
    {
        IRepository<Posts> postsRepository;
        IRepository<PostsAuthors> postsAuthorsRepository;
        IRepository<PostsMeta> postsMetaRepository;
        IRepository<PostsTags> postsTagsRepository;
        IRepository<PostRevisions> postRevisionsRepository;
        public PostsRepository(IRepository<Posts> postsRepository,
            IRepository<PostsAuthors> postsAuthorsRepository,
            IRepository<PostsMeta> postsMetaRepository,
            IRepository<PostsTags> postsTagsRepository,
            IRepository<PostRevisions> postRevisionsRepository)
        {
            this.postsRepository = postsRepository;
            this.postsAuthorsRepository = postsAuthorsRepository;
            this.postsMetaRepository = postsMetaRepository;
            this.postsTagsRepository = postsTagsRepository;
            this.postRevisionsRepository = postRevisionsRepository;
        }
        public IRepository<Posts> PostStore => postsRepository;

        public IRepository<PostsAuthors> PostAuthorStore => postsAuthorsRepository;

        public IRepository<PostsMeta> PostMetaStore => postsMetaRepository;

        public IRepository<PostsProducts> PostProductStore => throw new NotImplementedException();

        public IRepository<PostsTags> PostTagStore => postsTagsRepository;

        public IRepository<PostRevisions> PostRevisionStore => postRevisionsRepository;
    }
}
